VHDL: (Intro)Simple toggling of lights

The code here is very very simple! This will help you get introduced into VHDL coding.
I have done the toggling of the switch in a slightly different manner.

When the button is not pressed, it is logically HIGH (1).
When it is pressed, it drops LOW (0).

If you make the LED toggle sychronously with the clock, and if you detect only the LOW state of the key, then your LED will toggle rapidly. This is because, everytime there is a clock event (50Mhz, or the clockspeed of the FPGA), it detects that there is a ’0′ on the push button, and will thus toggle.

The best and simple method to do it is to keep a memory of what happened in the previous clock cycle through the use of a variable. I used two variables, pbutt_old(to hold the state of the push button in the previous state) and state_old(to hold the state of the LED).

The priciple of the code is, everytime you press the button, the button logic goes from 1 to 0. and when you release it, it goes from 0 to 1.
So if you see that your previous state was 1 and your new state is 0, then obviously you pressed the button.(toggling should occur only here)
If your old state is 0, and new state is 0, it means that the push button is HELD in a pressed position. (no toggling should occur at this point)
If your old state is 1, and new state is 1; it means you never pushed the button. (no toggling should occur).
CLICK TO READ THE REST

The Charger

Meanwell Power Supply Mod

I recently got a shipment of three SP350-48 Meanwell supplies. From the endless sphere forum, I thought they were just CV(Constant Voltage) power supplies, and thus I was designing a CC(constant Current) circuit similar to what you can buy from the Tppacks website.

In the End I have seen that these are actually newer model, with 3-shunts, and most IMPORTANTLY, they are CC-CV (Constant Current-Constant Voltage).

The Max current delivery at 59V was seen to be at 9.8A for 5minutes, and then drops to 7.6A( which is 0.3A more than rated current).

What I wanted was somewhere around 3A for the charging rate. Thus, what I did, was simply cut off 2 of the 3 shunt wires, thus reducing the current by one-third( to 3.5A). Not bad for $40. If I ever want more current again, I will simply resolder the shunts :)

This image gallery requires Flash

To view this gallery, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.

Download the free Flash Player now!

When the kit was first hauled in

XTRACYCLE KIT IS HERE

This is a MUST HAVE for any ebikers who want to carry another passenger to share their box of electric fun

This image gallery requires Flash

To view this gallery, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.

Download the free Flash Player now!

Btw, the Xtracycle kit does change the feel of the cycle. Here are a list of the changes
1. The Cycle is atleast 1.5foot longer(they say 15 Inches, but it feels longer)
2. Previously, My weight distribution was like this 28Lbs Front- 42Lbs Rear (yes, my cycle does weigh 70lbs)
Now it is 47Lbs rear, and 43 Lbs front. Thats almost 50-50. Which is good, and kind of bad too. You don’t want to be loosing traction on the rear wheel while making a turn (since the cycle is longer, I won’t be making 90° turns at 50kmph. Maybe 45kmph :twisted:

The good thing is, now, I can easily slip my Crystalyte 5303 on dusty road, or with wet tires(after rain) on the hallways of my building.

During hard acceleration, while I am done with 80% of the turn, the wheel drifts 8-) , causing the cycle to vibrate a bit due to the knobby mtb tires, which is kind of cool ;)

Another good thing about the bike being long is, now the wheelbase is longer, making the bike more stable even if the rear/front wheel has no traction.

Bad: During 4-10kmph the motor vibration causes the frame to resonate and emit a loud growling noise. So if you want a complete silent ride, look elsewhere.

Good: The cycle now feels like a motorcycle, growling to show off that you have 4kW(5Hp ;) ) of power.  Btw there is absolutely no noise after 10kmph. And how long do we cycle at <10kmph anyways :P ! I am usually doing 35kmph+ most of the time.

Bad: due to the cycle being longer, causing the point of rear wheel being further away from the suspension pivot, and due to the laws of physics, The rear suspension spring now faces greater force.
Good: Suspension Feels Softer, ride is atleast 3x better. Small movement of rear shock is enough to smoothen out the harsh bumps.

Good: You can carry a person.

Bad: Its a little to wobbly for my taste when a person moves .

Overall Rating So far : 4.5 Out of 5.

P1050931

Electric Boat

Some photo of the upcoming Electric Boat Conversion project.

It will house a Agni Motor 95 reinforced, OSMC (Open Source Motor Controller), and bunch of lipo batteries. Very simple Conversion, yet elegant. Below are the photos of the old boat getting its finish touch paints, new touch up stickers, and a new name “Whisper” ;)

This image gallery requires Flash

To view this gallery, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.

Download the free Flash Player now!